import 'package:flutter/material.dart';
import 'package:hello_flutter/base/index.dart';

class SingleChildScrollViewWidget extends BasePage {
  const SingleChildScrollViewWidget({super.key});

  @override
  String getPageTitle() => 'SingleChildScrollView';

  static const String str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

  @override
  Widget buildBody(BuildContext context) => Scrollbar(
        child: SingleChildScrollView(
          padding: const EdgeInsets.all(16),
          child: Center(
            child: Column(
              children: str
                  .split('')
                  .map((e) => Text(
                        e,
                        textScaler: const TextScaler.linear(2),
                      ))
                  .toList(),
            ),
          ),
        ),
      );
}
